/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Image
} from 'react-native';

export default class CImageDemo extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Image style={styles.image_common} source={require('./imgs/fengjing.jpg')}></Image>
        <Text>第一张图片</Text>
        <Image style={styles.image_common} source={{uri: 'baidu_logo.png'}}></Image>
        <Text>第二张图片</Text>
        <Image style={styles.image_common} source={{uri: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2069943096,3247060321&fm=27&gp=0.jpg'}}></Image>
        <Text>第三张图片</Text>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  image_first: {
    width: 100,
    height: 100,
  },
  image_second: {
    width: 100,
    height: 100,
  },
  image_third: {
    width: 100,
    height: 100,
  },
  image_common: {
    width: 100,
    height: 100,
    resizeMode: 'cover',
    overflow: 'hidden',
  },
});

AppRegistry.registerComponent('CImageDemo', () => CImageDemo);
